home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games: 500 MB Amiga Software / 500 MB Amiga Software - Euber 130 - Amiga Games Disc & Mag.iso / userbox / publicdomain / tinymeter / source / tinymeter_main / drawing.c next >
C/C++ Source or Header  |  1995-11-16  |  18KB  |  460 lines

  1. #include <exec/ports.h>
  2. #include <exec/memory.h>
  3. #include <exec/types.h>
  4. #include <clib/macros.h>
  5. #include <devices/timer.h>
  6. #include <intuition/intuition.h>
  7. #include <graphics/text.h>
  8. #include <datatypes/pictureclass.h>
  9. #include <dos/datetime.h>
  10. #include <stdio.h>
  11. #include <exec/io.h>
  12. #include <devices/serial.h>
  13.  
  14.  
  15. #define BSIZY   (dftm.BorderY)
  16. #define BSIZX   (dftm.BorderX)
  17. #define BSPC    (dftm.SpaceY)
  18. #define YPOS(line)  ((ULONG)((yypos[line])+1+BSIZY))
  19.  
  20. #include "structs.h"
  21.  
  22. extern struct Library          *RetinaBase;
  23. extern struct Library          *DataTypesBase;
  24. extern struct tm_settings       dftm;
  25. extern struct Window           *my_window;
  26. extern struct Screen           *my_pub_screen;
  27. extern struct TextFont         *my_text_font,
  28.                                *my_clock_font_1,
  29.                                *my_clock_font_2;
  30. extern struct RastPort         *my_rastport,
  31.                                 my_rp,
  32.                                 my_rp_2;
  33. extern ULONG                    gauge_x_pos,
  34.                                 gauge_y_pos_2,
  35.                                 gauge_x_size,
  36.                                 gauge_y_size,
  37.                                 info_x_size,
  38.                                 texty,
  39.                                 textdelta,
  40.                                 space,
  41.                                 space_x,
  42.                                 space_s;
  43. extern ULONG                    bas_c_ram,
  44.                                 bas_f_ram,
  45.                                 act_c_ram,
  46.                                 act_f_ram,
  47.                                 all_c_ram,
  48.                                 all_f_ram,
  49.                                 all_r_ram,
  50.                                 bas_r_ram,
  51.                                 act_r_ram,
  52.                                 all_o_ram[32],
  53.                                 bas_o_ram[32],
  54.                                 act_o_ram[32],
  55.                                 bas_idle;
  56. extern UWORD                    yypos[32];
  57. extern UWORD                    xxpos[32];
  58. extern struct BitMap           *my_bitmap;
  59. extern struct BitMapHeader     *my_header;
  60. extern char                    *LoadedVolList[64],
  61.                                *LoadedVolList_1[64];
  62.  
  63. extern unsigned long idle,maximum;
  64.  
  65. display_info(char *format, UBYTE line, UBYTE indent)
  66. {
  67.     char    *printstr;
  68.     WORD    where,spalte;
  69.  
  70.     spalte=line%dftm.colums;
  71.     ClipBlit(&my_rp_2,(gauge_x_pos+gauge_x_size+BSIZX)*(line%dftm.colums)+BSIZX+1,(yypos[line/dftm.colums])+BSIZY+1,&my_rp,0,textdelta,info_x_size-1,gauge_y_size,0xc0);
  72.     printstr=(char *)formatinfotext(format);
  73.     SetAPen (&my_rp,dftm.back_col);
  74.     SaveRectFill(&my_rp,0,textdelta,my_window->Width-(BSIZX<<1),gauge_y_size+textdelta);
  75.     SetAPen (&my_rp,dftm.lowl_col);
  76.     switch(indent)
  77.     {
  78.         case    0:
  79.                 where=(info_x_size>>1)-(TextLength(&my_rp,printstr,my_strlen(printstr))>>1);
  80.                 break;
  81.         case    1:
  82.                 where=BSIZX+4L;
  83.                 break;
  84.         case    2:
  85.                 where=(info_x_size-TextLength(&my_rp,printstr,my_strlen(printstr)));
  86.                 break;
  87.     }
  88.     Move(&my_rp,where,texty+textdelta);
  89.     if(TextLength(&my_rp,printstr,my_strlen(printstr))<info_x_size) Text(&my_rp,printstr,my_strlen(printstr));
  90.     ClipBlit(&my_rp,0,textdelta,my_rastport,(gauge_x_pos+gauge_x_size+BSIZX)*(line%dftm.colums)+BSIZX+1,(yypos[line/dftm.colums])+BSIZY+1,info_x_size-1,gauge_y_size,0xc0);
  91. }
  92.  
  93. display_a_gauge(LONG siz_1, LONG siz_2)
  94. {
  95.     siz_2--;
  96.     siz_1--;
  97.     if(siz_2>0)SaveRectFill(&my_rp,0,textdelta,siz_2,gauge_y_size+1+textdelta);
  98.     if(!dftm.NoBaseMem)
  99.     {
  100.         SetAPen(&my_rp,dftm.base_mem_col);
  101.         if(siz_1>0)SaveRectFill(&my_rp,0,textdelta,siz_1,gauge_y_size+1+textdelta);
  102.     }
  103.     SetAPen(&my_rp,dftm.back_col);
  104.     SaveRectFill(&my_rp,siz_2,textdelta,gauge_x_size-(siz_2+1),gauge_y_size+1+textdelta);
  105.     if(dftm._3DGauge)
  106.     {
  107.         if(!dftm.NoBaseMem)
  108.         {
  109.             if(siz_1>0)draw_a_border(0,textdelta,siz_1,gauge_y_size-1+textdelta,2,1,&my_rp);
  110.             if(((siz_1-siz_2)>1) || ((siz_2-siz_1)>1))draw_a_border(siz_1+1,textdelta,siz_2,gauge_y_size-1+textdelta,2,1,&my_rp);
  111.         }
  112.         else if(siz_2>0)draw_a_border(0,textdelta,siz_2,gauge_y_size-1+textdelta,2,1,&my_rp);
  113.     }
  114. }
  115.  
  116. displayline(LONG siz, LONG bas, LONG all, UBYTE line, char *format, UBYTE indent)
  117. {
  118.     LONG   siz_1,siz_2,siz_3,spalte;
  119.     spalte=line%dftm.colums;
  120.     ClipBlit(&my_rp_2,xxpos[spalte],yypos[line/dftm.colums]+BSIZY+1,&my_rp,0,textdelta,gauge_x_size-1,gauge_y_size,0xc0);
  121.     if(all>0)
  122.     {
  123.         siz_1=p2s(bas,all,gauge_x_size); siz_2=p2s(siz,all,gauge_x_size);
  124.         if(((siz) < (bas)) || (dftm.NoBaseMem )) SetAPen(&my_rp,dftm.add_mem_col);
  125.         else
  126.         {
  127.             siz_3=siz_1; siz_1=siz_2; siz_2=siz_3;
  128.             SetAPen(&my_rp,dftm.miss_mem_col);
  129.         }
  130.         if(!dftm.NoGauges)
  131.         {
  132.             if(!dftm.NoBaseMem) display_a_gauge(siz_1,siz_2);
  133.             else
  134.             {
  135.                 SetAPen(&my_rp,dftm.add_mem_col);
  136.                 display_a_gauge(0,siz_2);
  137.             }
  138.         }
  139.         if(dftm.DisplayNums)
  140.         {
  141.             WORD where;
  142.             char *printstr;
  143.  
  144.             printstr=(char *)formattext(siz,bas,all,format);
  145.  
  146.             switch(indent)
  147.             {
  148.                 case    0:
  149.                         where=(gauge_x_size>>1)-(TextLength(&my_rp,printstr,my_strlen(printstr))>>1);
  150.                         break;
  151.                 case    1:
  152.                         where=4L;
  153.                         break;
  154.                 case    2:
  155.                         where=gauge_x_size-TextLength(&my_rp,printstr,my_strlen(printstr))-4L;
  156.                         break;
  157.             }
  158.  
  159.             SetAPen(&my_rp,dftm.lowl_col); Move(&my_rp,where,texty+textdelta);
  160.             if(TextLength(&my_rp,printstr,my_strlen(printstr))<gauge_x_size)
  161.             {
  162.                 Move(&my_rp,where,texty+textdelta);
  163.                 Text(&my_rp,printstr,my_strlen(printstr));
  164.             }
  165.         }
  166.     }
  167.     ClipBlit(&my_rp,0,textdelta,my_rastport,xxpos[spalte],yypos[line/dftm.colums]+BSIZY+1,gauge_x_size-1,gauge_y_size,0xc0);
  168. }
  169.  
  170. /*
  171. #define MAX_SERS 8
  172.  
  173. extern struct IOExtSer *SerialIO[MAX_SERS];
  174. extern BOOL   device_present[MAX_SERS];
  175.  
  176. displaycarrier(UBYTE line)
  177. {
  178.     ULONG   spalte;
  179.     int     k;
  180.     for(k=0;k<MAX_SERS;k++)
  181.     if(device_present[k])
  182.     {
  183.         spalte=line%dftm.colums;
  184.         ClipBlit(&my_rp_2,xxpos[spalte],yypos[line/dftm.colums]+BSIZY,&my_rp,0,textdelta,gauge_x_size,gauge_y_size+2,0xc0);
  185.         SerialIO[k]->IOSer.io_Command  = SDCMD_QUERY;
  186.         if (!DoIO((struct IORequest *)SerialIO[k]))
  187.         {            
  188.             if ((SerialIO[k]->io_Status&32))
  189.             {
  190.                 draw_a_border(gauge_x_size/3,textdelta,(gauge_x_size/3)<<1,textdelta+gauge_y_size+1,1,2,&my_rp);
  191.             }
  192.             else
  193.             {
  194.                 draw_a_border(gauge_x_size/3,textdelta,(gauge_x_size/3)<<1,textdelta+gauge_y_size+1,2,1,&my_rp);
  195.                 SetAPen(&my_rp,dftm.miss_mem_col);
  196.                 RectFill(&my_rp,gauge_x_size/3+1,textdelta+1,((gauge_x_size/3)<<1),textdelta+gauge_y_size);
  197.             }
  198.         }
  199.         ClipBlit(&my_rp,0,textdelta,my_rastport,xxpos[spalte],yypos[line/dftm.colums]+BSIZY,gauge_x_size,gauge_y_size+2,0xc0);
  200.     }
  201. }
  202. */
  203.  
  204. get_avail_ram_and_display(ULONG new_bas, UBYTE numofvols)
  205. {
  206.     UBYTE   actline=0;
  207.     if((act_c_ram!=AvailMem(MEMF_CHIP))||(act_f_ram!=AvailMem(MEMF_FAST))||(new_bas!=0))
  208.     {
  209.         act_c_ram=AvailMem(MEMF_CHIP);
  210.         act_f_ram=AvailMem(MEMF_FAST);
  211.  
  212.         if(RetinaBase) act_r_ram=Retina_AvailMem(0L);
  213.         else act_r_ram=0L;
  214.  
  215.         if((numofvols>0)&(new_bas>0))getvolsizes(0);
  216.  
  217.         if(new_bas==1)
  218.         {
  219.             bas_c_ram=act_c_ram; bas_f_ram=act_f_ram;bas_r_ram=act_r_ram;
  220.             getvolsizes(1);
  221.         }
  222.         SetDrMd(&my_rp,JAM1);
  223.         SetFont(&my_rp,my_text_font);
  224.  
  225.         if(dftm.DisplayAll)     displayline(act_c_ram+act_f_ram,bas_c_ram+bas_f_ram,all_c_ram+all_f_ram,actline++,&dftm.TextFormat[0],dftm.MemIndent);
  226.         if(dftm.DisplayChip)    displayline(act_c_ram,bas_c_ram,all_c_ram,actline++,&dftm.TextFormat[0],dftm.MemIndent);
  227.         if(dftm.DisplayFast)    displayline(act_f_ram,bas_f_ram,all_f_ram,actline++,&dftm.TextFormat[0],dftm.MemIndent);
  228.         if(dftm.DisplayRetina)  displayline(act_r_ram,bas_r_ram,all_r_ram,actline++,&dftm.TextFormat[0],dftm.MemIndent);
  229.         if((numofvols>0)&(new_bas>1))
  230.         {
  231.             int k;
  232.             for(k=0;k<numofvols;k++) displayline(act_o_ram[k],bas_o_ram[k],all_o_ram[k],actline++,&dftm.VolumeTextFormat[0],dftm.VolIndent);
  233.         }
  234.         else actline+=numofvols;
  235.  
  236.         if(dftm.DisplayInfo_1) display_info(dftm.InfoTextFormat_1,actline++,dftm.InfIndent);
  237.         if(dftm.DisplayInfo_2) display_info(dftm.InfoTextFormat_2,actline++,dftm.InfIndent);
  238. /*        if(dftm.DisplayCarrier) displaycarrier(actline++);*/
  239.     }
  240.     else
  241.     {
  242.         SetDrMd(&my_rp,JAM1);
  243.         SetFont(&my_rp,my_text_font);
  244.  
  245.         if(dftm.DisplayAll)     actline++;
  246.         if(dftm.DisplayChip)    actline++;
  247.         if(dftm.DisplayFast)    actline++;
  248.         if(dftm.DisplayRetina)  actline++;
  249.         actline+=numofvols;
  250.         if(dftm.DisplayInfo_1)  actline++;
  251.         if(dftm.DisplayInfo_2)  actline++;
  252.     }
  253.     if(new_bas==1)bas_idle=0; if(bas_idle<idle)bas_idle=idle;if(dftm.DisplayIdle) displayline(idle,bas_idle,maximum,actline++,&dftm.IdleFormat[0],dftm.IdleIndent);
  254. }
  255.  
  256. make_add(UBYTE line)
  257. {
  258.     draw_a_border( (gauge_x_pos+gauge_x_size+BSIZX)*(line%dftm.colums)+BSIZX, yypos[line/dftm.colums]+BSIZY, (gauge_x_pos+gauge_x_size+BSIZX)*(line%dftm.colums)+BSIZX+info_x_size, yypos[line/dftm.colums]+1+BSIZY+gauge_y_size , 1 , 2 , my_rastport );
  259. }
  260.  
  261. dummy_proc(UBYTE actline, char *text)
  262. {
  263.     WORD spalte;
  264.     WORD x_pos;
  265.     spalte=actline%dftm.colums;
  266.     x_pos=((BSIZX+gauge_x_pos+gauge_x_size)*spalte)+gauge_x_pos;
  267.     if(dftm.GaugesBorder)draw_a_border(x_pos,YPOS(actline/dftm.colums)-1,x_pos+gauge_x_size,YPOS(actline/dftm.colums)+gauge_y_size,1,2,my_rastport);
  268.     if(dftm.ShadowText)
  269.     {
  270.         SetAPen(my_rastport,1);
  271.         Move(my_rastport,((gauge_x_pos+gauge_x_size+BSIZX)*spalte)+BSIZX,YPOS(actline/dftm.colums)+texty+1);
  272.         Text(my_rastport,text,my_strlen(text));
  273.         SetAPen(my_rastport,2);
  274.         Move(my_rastport,((gauge_x_pos+gauge_x_size+BSIZX)*spalte)+BSIZX-1,YPOS(actline/dftm.colums)+texty);
  275.         Text(my_rastport,text,my_strlen(text));
  276.     }
  277.     else
  278.     {
  279.         SetAPen(my_rastport,dftm.text_col);
  280.         Move(my_rastport,((gauge_x_pos+gauge_x_size+BSIZX)*spalte)+BSIZX-1,YPOS(actline/dftm.colums)+texty);
  281.         Text(my_rastport,text,my_strlen(text));
  282.     }
  283.  
  284. }
  285.  
  286. draw_borders_and_background()
  287. {
  288.     UBYTE   c_1=2,c_2=1;
  289.  
  290.     ClipBlit(&my_rp_2,0,0,my_rastport,0,0,my_window->Width,my_window->Height,0xc0);
  291.  
  292.     if((dftm.back_pic==1)&&(DataTypesBase))
  293.     {
  294.         if(my_bitmap)
  295.         {
  296.             CopyTiledBitMap(my_bitmap,my_header->bmh_Width,my_header->bmh_Height,my_rastport);
  297.             CopyTiledBitMap(my_bitmap,my_header->bmh_Width,my_header->bmh_Height,&my_rp_2);
  298.         }
  299.         else
  300.         {
  301.             SetAPen(my_rastport,dftm.all_back_col);
  302.             SaveRectFill(my_rastport,0,0,my_window->Width,my_window->Height);
  303.             SetAPen(&my_rp_2,dftm.all_back_col);
  304.             SaveRectFill(&my_rp_2,0,0,my_window->Width,my_window->Height);
  305.         }
  306.     }
  307.     else
  308.         if((dftm.back_pic==2))
  309.         {
  310.             WORD oldx,oldy,oldx1,oldy1;
  311.             oldx=my_window->Width;
  312.             oldy=my_window->Height;
  313.             oldx1=my_window->LeftEdge;
  314.             oldy1=my_window->TopEdge;
  315.             WaitBlit();
  316.             RemoveGList(my_window,my_window->FirstGadget,-1);
  317.             CloseWindow(my_window);
  318.             BltBitMapRastPort(my_pub_screen->RastPort.BitMap,oldx1,oldy1,&my_rp_2,0,0,oldx,oldy,0xc0);
  319.             WaitBlit();
  320.             open_new_window(oldx1,oldy1,oldx,oldy);
  321.             get_min_size();
  322.             ClipBlit(&my_rp_2,0,0,my_rastport,0,0,my_window->Width,my_window->Height,0xc0);
  323.             WaitBlit();
  324.         }
  325.         else
  326.         {
  327.             SetAPen(my_rastport,dftm.all_back_col);
  328.             SaveRectFill(my_rastport,0,0,my_window->Width,my_window->Height);
  329.             SetAPen(&my_rp_2,dftm.all_back_col);
  330.             SaveRectFill(&my_rp_2,0,0,my_window->Width,my_window->Height);
  331.         }
  332.  
  333.     SetAPen(my_rastport,1);
  334.     if(dftm.border_double!=2)
  335.     {
  336.         if(dftm.border_double)
  337.         {
  338.             c_1=1;c_2=2;
  339.             draw_a_border(1,1,my_window->Width-2,my_window->Height-2,2,1,my_rastport);
  340.         }
  341.         draw_a_border(0,0,my_window->Width-1,my_window->Height-1,c_1,c_2,my_rastport);
  342.     }
  343.     c_2=0;
  344.     c_1=0;
  345.     if(dftm.DisplayAll)         dummy_proc(c_2++,&dftm.AllText[0]);
  346.     if(dftm.DisplayChip)        dummy_proc(c_2++,&dftm.ChipText[0]);
  347.     if(dftm.DisplayFast)        dummy_proc(c_2++,&dftm.FastText[0]);
  348.     if(dftm.DisplayRetina)      dummy_proc(c_2++,&dftm.RetinaText[0]);
  349.     while(LoadedVolList[c_1]!=0)dummy_proc(c_2++,LoadedVolList[c_1++]);
  350.     if(dftm.DisplayInfo_1&&dftm.GaugesBorder) make_add(c_2++);
  351.     if(dftm.DisplayInfo_2&&dftm.GaugesBorder) make_add(c_2++);
  352.     if(dftm.DisplayIdle  )      dummy_proc(c_2++,&dftm.IdleText[0]);
  353. }
  354.  
  355. BOOL on_off;
  356.  
  357. DisplayCLOCK(struct DateTime *dtt, UBYTE lastline)
  358. {
  359.     char                     extstr[64],len=8;
  360.     ULONG                    where,pitty;
  361.     struct DateStamp        *ptr_ds;
  362.  
  363.     if(dftm.DisplayDIGITAL|dftm.DisplayDATE)
  364.     {
  365.         if((dftm.ClockFormat & 1)==0)len=5;
  366.         if((dftm.ClockFormat & 2)==2)len+=3;
  367.         SetAPen(&my_rp,dftm.text_col);
  368.         SetDrMd(&my_rp,JAM1);
  369.         pitty=MAX(my_clock_font_1->tf_YSize,my_clock_font_2->tf_YSize);
  370.     }
  371.     switch((dftm.ClockIndent & 15))
  372.     {
  373.         case    0:
  374.                 where=((my_window->Width>>1) - (dftm.DisplayDIGITAL ? ((my_clock_font_1->tf_XSize*len)>>1) : 0) - ((dftm.DisplayDATE ? (my_clock_font_2->tf_XSize*9) : 0)>>1) );
  375.                 break;
  376.         case    1:
  377.                 where=BSIZX;
  378.                 break;
  379.         case    2:
  380.                 where=my_window->Width-(dftm.DisplayDIGITAL ? (my_clock_font_1->tf_XSize*len):0)-BSIZX - (dftm.DisplayDATE ? (my_clock_font_2->tf_XSize*9) : 0) ;
  381.                 break;
  382.     }
  383.     if(dftm.DisplayDIGITAL)
  384.     {
  385.         char text[21];        
  386.         ptr_ds=&dtt->dat_Stamp;
  387.         if((dftm.ClockFormat&2)==0)
  388.         {
  389.             strcpy((char *)&text,on_off ? (char *)"%02ld:%02ld:%02ld" : (char *)"%02ld %02ld %02ld");
  390.             sprintf_exec(&extstr[0], &text ,(ptr_ds->ds_Minute/60),ptr_ds->ds_Minute%60,ptr_ds->ds_Tick/50);
  391.         }
  392.         else
  393.         {
  394.             ULONG dummy_1;
  395.             BOOL  dummy_2=FALSE;
  396.             dummy_1=(ptr_ds->ds_Minute/60);
  397.             if(dummy_1>12) {dummy_1-=12;dummy_2=TRUE;}
  398.             if (len==8)
  399.             {
  400.                 strcpy((char *)&text,on_off ? (char *)"%2ld:%02ld %s" : (char *)"%2ld %02ld %s");
  401.                 sprintf_exec(&extstr[0], &text,dummy_1,ptr_ds->ds_Minute%60,dummy_2 ? "PM" : "AM" );
  402.             }
  403.             else
  404.             {
  405.                 strcpy((char *)&text,on_off ? (char *)"%2ld:%02ld:%02ld %s" : (char *)"%2ld %02ld %02ld %s");
  406.                 sprintf_exec(&extstr[0], &text,dummy_1,ptr_ds->ds_Minute%60,ptr_ds->ds_Tick/50,dummy_2 ? "PM" : "AM" );
  407.             }
  408.  
  409.         }
  410.         SetFont(&my_rp,my_clock_font_1);
  411.         ClipBlit(&my_rp_2,where,( dftm.ClockIndent & 16 ? BSIZY : YPOS(lastline)),&my_rp,0,textdelta,(my_clock_font_1->tf_XSize*len),pitty+1,0xc0);
  412.         if(dftm.ShadowText)
  413.         {
  414.             SetAPen(&my_rp,1);
  415.             Move(&my_rp,1,pitty+textdelta);
  416.             Text(&my_rp,extstr,my_strlen(extstr));
  417.             SetAPen(&my_rp,2);
  418.             Move(&my_rp,0,pitty+textdelta-1);
  419.             Text(&my_rp,extstr,my_strlen(extstr));
  420.         }
  421.         else
  422.         {
  423.             SetAPen(&my_rp,dftm.text_col);
  424.             Move(&my_rp,0,pitty+textdelta-1);
  425.             Text(&my_rp,extstr,my_strlen(extstr));
  426.         }
  427.         ClipBlit(&my_rp,0,textdelta,my_rastport,where, ( dftm.ClockIndent & 16 ? BSIZY : YPOS(lastline)) ,my_clock_font_1->tf_XSize*len,pitty+1,0xc0);
  428.     }
  429.     if(dftm.DisplayDATE)
  430.     {
  431.         dtt->dat_Format=dftm.DateFormat ? FORMAT_USA : FORMAT_CDN;
  432.         dtt->dat_Flags=0;
  433.         dtt->dat_StrDate=&extstr[0];
  434.         dtt->dat_StrDay=0L;
  435.         dtt->dat_StrTime=0L;
  436.         if(DateToStr(dtt))
  437.         {
  438.             SetFont(&my_rp,my_clock_font_2);
  439.             ClipBlit(&my_rp_2,where+(dftm.DisplayDIGITAL ? my_clock_font_1->tf_XSize*len : 0)+my_clock_font_2->tf_XSize,( dftm.ClockIndent & 16 ? BSIZY : YPOS(lastline)),&my_rp,0,textdelta,(my_clock_font_2->tf_XSize*8),pitty+1,0xc0);
  440.             if(dftm.ShadowText)
  441.             {
  442.                 SetAPen(&my_rp,1);
  443.                 Move(&my_rp,1,pitty+textdelta);
  444.                 Text(&my_rp,extstr,my_strlen(extstr));
  445.                 SetAPen(&my_rp,2);
  446.                 Move(&my_rp,0,pitty+textdelta-1);
  447.                 Text(&my_rp,extstr,my_strlen(extstr));
  448.             }
  449.             else
  450.             {
  451.                 SetAPen(&my_rp,dftm.text_col);
  452.                 Move(&my_rp,1,pitty+textdelta);
  453.                 Text(&my_rp,extstr,my_strlen(extstr));
  454.             }
  455.             ClipBlit(&my_rp,0,textdelta,my_rastport,where+(dftm.DisplayDIGITAL ? (my_clock_font_1->tf_XSize*len) : 0)+my_clock_font_2->tf_XSize,( dftm.ClockIndent & 16 ? BSIZY : YPOS(lastline)),my_clock_font_2->tf_XSize*8,pitty+1,0xc0);
  456.         }
  457.     }
  458. }
  459.  
  460.